#include "LengthDisplayFormat.h"
#include "LengthUnit.h"
#include "UnitsVisitor.h"
#include "OrderedStdUnit.h"

static const OrderedStdUnit& ORDERED_UNITS = OrderedStdUnit::getOrderedStdUnit();

void InchUnitDisplay::toStringFormat(ostream& os, float amountInBaseUnit)
{
	INCH.formatThisUnit(os, amountInBaseUnit);       
}

void CascadeUnitDisplay::toStringFormat(ostream& os, float amountInBaseUnit)
{
		UnitsVisitor unitsVisitor(os, amountInBaseUnit);
		OrderedStdUnit::getOrderedStdUnit().accept(&unitsVisitor);
}	

void FeetInchUnitDisplay::toStringFormat(ostream& os, float amountInBaseUnit)
{
		UnitsVisitor unitsVisitor(os, amountInBaseUnit);
        //ORDERED_UNITS.accept(&unitsVisitor);
		OrderedStdUnit::getOrderedStdUnit().accept(&unitsVisitor, &FEET);
}	
